package com.halasa.backup;

import java.io.IOException;
import java.util.Date;
import java.util.logging.Logger;

public class Main {

    private static final Logger LOG = Logger.getLogger(Main.class.getSimpleName());
    
    public static void main(String[] args) throws IOException {
        LOG.info("--- Starting at " + new Date() + " ---\n");
        
        IncrementalBackup compare = new IncrementalBackup(Config.getInstance());
        
        compare.run();
        LOG.info("\n--- Results ---");
        LOG.info("New files:     " + compare.getCreated());
        LOG.info("Updated files: " + compare.getUpdated());
        LOG.info("Deleted files: " + compare.getRemoved());
        
        LOG.info("\n--- Old incremental backup dirs ---");
        compare.removeOldIncDirs();
    }
}
